#pragma once
#include "textura.h"
#include <map>
#include <string>

typedef struct _Tile{
	_Tile(float i1,float d1,float i2,float d2):x1(i1),y1(d1),x2(i2),y2(d2){}
	float x1;
	float y1;
	float x2;
	float y2;
	}Tile;
class TileSet :
	public Textura
	{
	private:
		int totalTiles;
		//std::map<short,Tile*> tiles;
		Tile **tiles;
		int inicial;
	public:
		TileSet(std::string & ruta, bool alpha,int anchoTile, int altoTile, int numeroInicial);
		int getTotalTiles(){return totalTiles;}
		Tile* getTile(short nTile){return tiles[nTile-inicial];}
		bool tieneTile(short nTile){return inicial + totalTiles>=nTile && nTile >= inicial;}
		void renderTile(float x1, float y1, float x2, float y2, short IDtile);
		~TileSet(void);
	private:
		
	};
